package com.ndp.fb.enums;

import java.util.Locale;

/**
 * Created by Administrator on 2015/3/20.
 */
public enum TagForBuildnameType {
    country_code("country_code"),
    device("device"),
    product_set("product_set"),
    audience("audience"),
    site("site"),
    template_materiel("template_materiel"),
    bid_type("bid_type"),
    date("date"),
    creator("creator"),
    price("price"),
    unique("unique"),
    //MMdd 0114 : 2016/1/14
    short_date("short_date"),
    //小流水，每用户每天的流水
    lite_serial_number("lite_serial_number"),

    //dpa
    url("url"),
    product_name("product_name"),
    brand("brand"),
    description("description"),
    current_price("current_price"),
    custom_label_0("custom_label_0"),
    custom_label_1("custom_label_1"),
    custom_label_2("custom_label_2"),
    custom_label_3("custom_label_3"),
    custom_label_4("custom_label_4"),
    product_feed_id("product_feed_id"),
    picture_name("picture_name"),
    //cell_type 素材类别
    cell_type("cell_type"),
    //utm_term中的出价方式
    utm_term_bid_type("utm_term_bid_type"),
    //utm_term中的日期
    utm_term_date("utm_term_date"),
    utm_term_site("utm_term_site"),
    walle("walle"),
    creative_type("creative_type");

    /**
     * name
     */
    private String key;


    /**
     * 构造方法
     *
     * @param key  key
     */
    private TagForBuildnameType(String key) {
        this.key = key;
    }

    /**
     * @param key key
     * @return CampaignNameType
     */
    public static TagForBuildnameType getTagForBuildnameType(String key) {
        for (TagForBuildnameType c : TagForBuildnameType.values()) {
            if (c.getKey().equals(key)) {
                return c;
            }
        }
        return null;
    }


    public String getKey() {
        return key;
    }

    @Override
    public String toString() {
        return super.toString().toLowerCase(Locale.getDefault());
    }
}
